from langchain.agents import load_tools
from langchain.agents import initialize_agent
from langchain.agents import AgentType
from openai import (
    OpenAI
)
import os
os.environ['OPENAI_API_KEY'] = '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'
llm = OpenAI(temperature=0)
tools = load_tools(["serpapi", "llm-math"], llm=llm)
agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)
agent.run("Who is Leo DiCaprio's girlfriend? What is her current age raised to the 0.43 power?")